Property Testing — property based testing Property Testing, gemini-livestockai, community, property based testing, ide skills, fast-check integration, business logic validation, typescript testing, ai agent development, invariant validation, Claude Code

v1.0.0
GitHub

About this Skill

Perfect for AI Agents needing robust validation of business logic invariants using property-based testing with fast-check. Property Testing is a method of verifying properties that hold for all possible inputs, using frameworks like fast-check.

Features

Uses property-based testing with fast-check
Validates business logic invariants
Supports testing with TypeScript
Verifies properties for all possible inputs
Utilizes fc.assert and fc.property for testing

# Core Topics

captjay98 captjay98
[5]
[1]
Updated: 3/7/2026

Agent Capability Analysis

The Property Testing skill by captjay98 is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for property based testing, fast-check integration, business logic validation.

Ideal Agent Persona

Perfect for AI Agents needing robust validation of business logic invariants using property-based testing with fast-check.

Core Value

Empowers agents to validate properties that hold for all possible inputs using property-based testing with fast-check, ensuring robustness and reliability in their decision-making processes with libraries like fast-check.

Capabilities Granted for Property Testing

Validating business logic invariants for critical applications
Ensuring robustness of AI models with property-based testing
Debugging complex issues using fast-check's property testing capabilities

! Prerequisites & Limits

  • Requires implementation of property-based testing with fast-check
  • May require significant test case development for complex business logic
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

Property Testing

Install Property Testing, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Property Testing

LivestockAI uses property-based testing (PBT) with fast-check to validate business logic invariants.

What is Property Testing?

Instead of testing specific examples, property tests verify that properties hold for ALL possible inputs:

typescript
1// Example-based test 2it('calculates FCR correctly', () => { 3 expect(calculateFCR(150, 100)).toBe(1.5) 4}) 5 6// Property-based test 7it('FCR is always positive when inputs are positive', () => { 8 fc.assert( 9 fc.property( 10 fc.float({ min: 0.1, max: 10000 }), 11 fc.float({ min: 0.1, max: 10000 }), 12 (feed, weight) => { 13 const fcr = calculateFCR(feed, weight) 14 return fcr === null || fcr > 0 15 }, 16 ), 17 ) 18})

fast-check Basics

typescript
1import { describe, it, expect } from 'vitest' 2import * as fc from 'fast-check' 3 4describe('Property Tests', () => { 5 it('property holds for all inputs', () => { 6 fc.assert( 7 fc.property(fc.integer({ min: 1, max: 100000 }), (quantity) => { 8 // Property must return true or throw 9 return quantity > 0 10 }), 11 { numRuns: 100 }, 12 ) 13 }) 14})

Common Arbitraries

typescript
1// Integers 2fc.integer({ min: 1, max: 100000 }) 3fc.nat() // Non-negative integer 4 5// Floats 6fc.float({ min: 0, max: 10000 }) 7 8// Strings 9fc.string() 10fc.uuid() 11 12// Arrays 13fc.array(fc.integer(), { minLength: 0, maxLength: 20 }) 14 15// Objects 16fc.record({ 17 quantity: fc.integer({ min: 1, max: 1000 }), 18 price: fc.float({ min: 0, max: 10000 }), 19})

Inventory Invariant Example

From tests/features/batches/batches.property.test.ts:

typescript
1/** 2 * Property 4: Inventory Invariant 3 * For any batch, current_quantity SHALL always equal: 4 * initial_quantity - sum(mortality) - sum(sales) 5 */ 6describe('Property 4: Inventory Invariant', () => { 7 it('current_quantity equals initial - mortalities - sales', () => { 8 fc.assert( 9 fc.property( 10 fc.integer({ min: 1, max: 100000 }), 11 fc.array(fc.integer({ min: 1, max: 1000 })), 12 fc.array(fc.integer({ min: 1, max: 1000 })), 13 (initial, mortalities, sales) => { 14 const { constrained } = constrainQuantities( 15 initial, 16 mortalities, 17 sales, 18 ) 19 const current = calculateCurrentQuantity(initial, constrained) 20 21 expect(current).toBeGreaterThanOrEqual(0) 22 expect(current).toBeLessThanOrEqual(initial) 23 }, 24 ), 25 { numRuns: 100 }, 26 ) 27 }) 28})

Linking to Requirements

Annotate tests with requirement links:

typescript
1/** 2 * **Validates: Requirements 3.2, 4.2, 8.2** 3 */ 4it('inventory invariant holds', () => { 5 // ... 6})

When to Use Property Testing

  • Mathematical calculations (FCR, mortality rate, profit)
  • Invariants (quantity never negative, totals match)
  • State transitions (batch status changes)
  • Data transformations (currency conversion)
  • vitest-patterns - Unit testing basics
  • three-layer-architecture - Service layer testing

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is Property Testing?

Perfect for AI Agents needing robust validation of business logic invariants using property-based testing with fast-check. Property Testing is a method of verifying properties that hold for all possible inputs, using frameworks like fast-check.

How do I install Property Testing?

Run the command: npx killer-skills add captjay98/gemini-livestockai/Property Testing. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for Property Testing?

Key use cases include: Validating business logic invariants for critical applications, Ensuring robustness of AI models with property-based testing, Debugging complex issues using fast-check's property testing capabilities.

Which IDEs are compatible with Property Testing?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for Property Testing?

Requires implementation of property-based testing with fast-check. May require significant test case development for complex business logic.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add captjay98/gemini-livestockai/Property Testing. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use Property Testing immediately in the current project.

Related Skills

Looking for an alternative to Property Testing or another community skill for your workflow? Explore these related open-source skills.

View All

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
AI

flags

Logo of vercel
vercel

The React Framework

138.4k
0
Browser

pr-review

Logo of pytorch
pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

98.6k
0
Developer